<p id="list_images"><b>Im&aacute;genes asociadas</b></p>
@if (Session::has('message'))
    <div class="alert alert-info">{{ Session::get('message') }}</div>
@endif
<div id="sort" class="row">
            @foreach($images as $image)
            <div id="items_{{ $image->id }}" class="col-lg-2 col-md-2 col-sm-3 col-xs-4">
                <div class="thumbnail">
                <img src="{{ URL::to($image->img->url('thumbnail'))}}" class="img-responsive"/>
                    {{-- $image->img_file_name --}}
                    {{-- Str::limit($image->title, $limit = 30, $end = '...') --}}
                    {{-- $image->pivot->position --}}
                    <br>
                    <div class="row">
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <!-- edit button -->
                            <a class="btn btn-sm btn-info" href="{{URL::to('admin/' . $entidad . '/imagenes/' . $image->id . '/edit')}}" data-toggle="modal" data-target="#myModal"><span class="glyphicon glyphicon-pencil"></span></a>
                        </div>
                        <!-- delete button -->
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right">
                            <!--{{ Form::button('<span class="glyphicon glyphicon-trash"></span>', array('onclick' => 'admin/imagenes/'.$image->id,'method' => 'DELETE', 'class' => 'btn btn-xs btn-danger')) }}-->
                            <!--<button method="delete" class="btn btn-xs btn-danger" href="{{ URL::to('admin/imagenes/'. $image->id) }}"><span class="glyphicon glyphicon-trash"></span></a>-->
                            {{ Form::open(array('url' => 'admin/' . $entidad . '/imagenes/' . $image->id)) }}
                            {{ Form::hidden('_method', 'DELETE') }}
                            {{ Form::button('<span class="ladda-label"><span class="glyphicon glyphicon-trash"></span></span>', ['type' => 'submit', 'class' => 'ladda-button delete-button btn btn-sm btn-danger', 'data-style'=>'zoom-in']) }}
                            {{ Form::close() }}
                        </div>
                    </div>
                    </div>

            </div>
            @endforeach
</div>